package com.fjwt.gz.task.web;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.stereotype.Service;
import org.springframework.web.context.ServletContextAware;

/*
 * 读取servletContext 上下文工具类
 *
 * @author wg
 * @site https://pt.jdyd.xyz/
 * @date 2021/6/8 17:13
 */
@Service
public class ApplicationContextKit implements ServletContextAware, InitializingBean {

    private jakarta.servlet.ServletContext servletContext;

    @Override
    public void setServletContext(jakarta.servlet.ServletContext servletContext) {

        this.servletContext = servletContext;
    }

    /**
     * afterPropertiesSet 是在什么之后执行？ 启动顺序是？
     * 调用PropKit（SpringBeansUtil.getBean获取方式） 会不会出现找不到bean的问题？
     */
    @Override
    public void afterPropertiesSet() throws Exception {

    }
}
